package com.foreknow.demo2.Test4;

public class Circle implements ShapePara {
    public double radius;
    private double x;
    protected double y;

    @Override
    public double getArea() {
        return 3.14*radius*radius;
    }

    @Override
    public double getCircumference() {
        return 2*3.14*radius;
    }
    Circle(double radius){
        this.radius = radius;
    }
    double getRadius(){
        return radius;
    }

    void setRadius(double radius){
        this.radius = radius;
    }
    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
    void setCenter(double x, double y){
        if (x == y){
            this.radius = x = y;
        }
    }
}
